@imenam/mcp-documentor 1.0.51 → 1.0.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/src/gui-worker.js
CHANGED
|
@@ -585,7 +585,7 @@ app.post("/api/images", async (c) => {
|
|
|
585
585
|
const finalName = resolveImageFilename(assetsDir, file.name ?? "image");
|
|
586
586
|
const buffer = Buffer.from(await file.arrayBuffer());
|
|
587
587
|
fs.writeFileSync(path.join(assetsDir, finalName), buffer);
|
|
588
|
-
return c.json({ url: `/api/images/${project}/${finalName}`, filename: finalName });
|
|
588
|
+
return c.json({ url: `/api/images/${encodeURIComponent(project)}/${encodeURIComponent(finalName)}`, filename: finalName });
|
|
589
589
|
});
|
|
590
590
|
app.get("/api/images/:project", (c) => {
|
|
591
591
|
const project = c.req.param("project");
|
|
@@ -593,7 +593,7 @@ app.get("/api/images/:project", (c) => {
|
|
|
593
593
|
if (!fs.existsSync(assetsDir))
|
|
594
594
|
return c.json([]);
|
|
595
595
|
const files = fs.readdirSync(assetsDir).filter((f) => /\.(png|jpe?g|gif|webp|svg)$/i.test(f));
|
|
596
|
-
return c.json(files.map((f) => ({ filename: f, url: `/api/images/${project}/${f}` })));
|
|
596
|
+
return c.json(files.map((f) => ({ filename: f, url: `/api/images/${encodeURIComponent(project)}/${encodeURIComponent(f)}` })));
|
|
597
597
|
});
|
|
598
598
|
app.get("/api/images/:project/:filename", (c) => {
|
|
599
599
|
const project = c.req.param("project");
|
|
@@ -36,7 +36,7 @@ export async function uploadImage(storageEngine, args) {
|
|
|
36
36
|
fs.mkdirSync(assetsDir, { recursive: true });
|
|
37
37
|
const finalName = resolveFilename(assetsDir, validated.filename);
|
|
38
38
|
fs.copyFileSync(validated.filePath, path.join(assetsDir, finalName));
|
|
39
|
-
const url = `/api/images/${project}/${finalName}`;
|
|
39
|
+
const url = `/api/images/${encodeURIComponent(project)}/${encodeURIComponent(finalName)}`;
|
|
40
40
|
const alt = validated.alt ?? "";
|
|
41
41
|
const markdownLink = ``;
|
|
42
42
|
return {
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const APP_VERSION = "1.0.
|
|
1
|
+
export declare const APP_VERSION = "1.0.52";
|
package/dist/src/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Auto-generated version file - do not edit manually
|
|
2
|
-
export const APP_VERSION = '1.0.
|
|
2
|
+
export const APP_VERSION = '1.0.52';
|